package com.itheima.dubbo.service;

import com.itheima.dubbo.User;
import com.itheima.dubbo.UserFace;
import org.apache.dubbo.config.annotation.DubboService;

@DubboService   //标识服务提供方注解
public class UserFaceImpl implements UserFace {



    @Override
    public String hello(String username) {

        return "hello Dubbo username:" + username;
    }

    @Override
    public User getById(User user)  {
        User userResult = new User(user.getId(), "dingyuntao", 23);


        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return userResult;
    }
}
